<template>
	<view class="">
		<view class="page-view">
			<view class="thumb-box" @click="toDetail(item)" v-for="(item, index) in dataList" :key="item.id">
				<image class="img" :src="item.cover_image" mode="scaleToFill"></image>
				<view class="right-text">
					<view class="right-box">
						<view class="title">{{item.name}}</view>
					</view>
					<view v-if="pageType != 'order'" class="shop-price">
						<!-- {{item.money}}<text class="org">兑换券</text> -->
					</view>
					<view v-else class="toPlay">
						<u-icon name="play-circle-fill" color="#fe466b" size="35"></u-icon>
						继续播放<text class="org">（上次观看到）</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			dataList: {
				require: true,
				type: Array,
				default: []
			},
			pageType: {
				require: false,
			}
		},
		data() {
			return {
				baseUrl: this.$u.http.config.baseUrl,

			}
		},
		methods: {
			toDetail(item) {
				this.$u.route('/packageB/pages/hotClassDetail/hotClassDetail', {
					title: item.name,
					id: item.id,
					pageType: 'class'
				})
			}
		}
	}
</script>

<style lang="scss">
	.page-view {
		padding: 0 20rpx;
	}

	.img {
		width: 150rpx;
		height: 150rpx;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}

	.class-item {
		margin-bottom: 30rpx;
		background-color: #fff;
		padding: 16rpx;
		border-radius: 8rpx;
	}

	.item-container {
		display: flex;
		flex-wrap: wrap;
	}

	.thumb-box {
		padding-left: 20rpx;
		width: 100%;
		min-height: 200rpx;
		display: flex;
		align-items: center;
		margin-top: 10rpx;
		margin-bottom: 20rpx;
		box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
		border-radius: 20rpx;

		.item-menu-image {
			width: 150rpx;
			height: 150rpx;
			border-radius: 20rpx;
			;
		}

		.right-box {
			height: 130rpx;

			.title {
				min-height: 50rpx;
				// margin-left: 20rpx;
				font-size: 16px;
				font-weight: bold;
				font-family: "Arial",sans-serif;
				// font-weight: 700;
				width: 450rpx;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 3;
				overflow: hidden;
				text-overflow: ellipsis;
			}
		}

		.right-text {
			margin: 0 30rpx;

			.toPlay {
				color: #FE5477;
				margin-top: 10rpx;
				font-size: 30rpx;

				.org {
					margin-left: 40rpx;
					font-size: 20rpx;
					color: #ccc;
				}
			}

			.shop-name {
				font-size: 32rpx;
				font-weight: 700;
				width: 450rpx;
			}

			.shop-price {
				color: #FE5477;
				margin-top: 10rpx;
				font-size: 30rpx;

				.org {
					margin-left: 10rpx;
					font-size: 20rpx;
					color: #ccc;
					// text-decoration: line-through
				}
			}
		}


	}
</style>